import VueRouter from 'vue-router'
import HomeContainer from  './components/tobbar/HomeContainer.vue'
import MemberContainer from  './components/tobbar/MemberContainer.vue'
import ShopcarContainer from  './components/tobbar/ShopcarContainer.vue'
import SearchContainer from  './components/tobbar/SearchContainer.vue'
import newsList from "./components/news/NewsList.vue"
import newsInfo from "./components/news/NewsInfo.vue"
var router=new VueRouter({
    routes:[
        {path:"/",redirect:"/home"},//路由重定向
        {path:"/home",component:HomeContainer},
        {path:"/member",component:MemberContainer},
        {path:"/shopcar",component:ShopcarContainer},
        {path:"/search",component:SearchContainer},
        {path:"/home/newsList",component:newsList},
        {path:'/home/newsInfo/:id',component:newsInfo}//:id 表示要传递的参数   忘记加个/,导致组件内容没出来
    ],
    linkActiveClass:"mui-active"

})
export  default router